package gov.nasa.anml.lifted;

import gov.nasa.anml.State;
import gov.nasa.anml.utility.SimpleBoolean;

public class Ordered extends CompoundIntervalExpression {

	public SimpleBoolean value(State p) {
		for (int i=0;i<expressions.size();++i) {
			if (expressions.get(i).value(p) != ANMLBoolean.True)
				return ANMLBoolean.False;
		}
		// TODO: remember envelop and enforce linear order
		return ANMLBoolean.True;
	}
}
